<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout/layout}">
<head>
</head>
<body>
<div layout:fragment="content">
    <h1 th:text="#{userGroup.admin}">分店管理</h1>
    <div>
        <form id="userForm" class="form-horizontal" th:action="@{/admin/userGroup/edit}" th:object="${userGroup}" method="post">
            <input type="hidden" th:field="*{id}"/>
            <div class="form-group">
                <label for="no" class="col-sm-1 control-label"  th:text="#{userGroup.no}">店号</label>
                <div class="col-sm-2">
                    <input type="text" th:field="*{no}" class="form-control" required minlength="5" th:placeholder="#{userGroup.no}"/>
                    <p th:if="${#fields.hasErrors('no')}" th:errors="*{no}" class="error">店号错误</p>
                </div>
                <label for="name" class="col-sm-1 control-label" th:text="#{userGroup.name}">店名</label>
                <div class="col-sm-2">
                    <input type="text" th:field="*{name}" class="form-control" required th:placeholder="#{userGroup.name}"/>
                    <p th:if="${#fields.hasErrors('name')}" th:errors="*{name}" class="error">店名错误</p>
                </div>
                <label for="address" class="col-sm-1 control-label" th:text="#{user.address}">地址</label>
                <div class="col-sm-2">
                    <input type="text" th:field="*{address}" class="form-control" th:placeholder="#{user.address}"/>
                    <p th:if="${#fields.hasErrors('address')}" th:errors="*{address}" class="error">地址错误</p>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-5">
                    <input type="submit" th:value="#{submit}" class="btn btn-info"/>
                    &nbsp; &nbsp; &nbsp;
                    <a href="/admin/userGroup/list" th:href="@{/admin/userGroup/list}" class="btn btn-info" th:text="#{back}">返回</a>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>
